from myTool.tools import draw, getMothDate

if __name__ == '__main__':
    x_list = [
        '一月',
        '二月',
        '三月',
        '四月',
        '五月',
        '六月',
        '七月',
        '八月',
        '九月',
        '十月',
        '十一月',
        '十二月'
    ]  # 横坐标的值
    time_list = [i for i in range(2012, 2022)]
    # 某一年的数据
    data_login = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 登录页面  数据里面的时间key要与timeline的同步
    data_register = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 注册页面
    data_error = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 错误页面
    data_learning = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 学习星球页面
    data_playing = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 快乐星球页面
    data_modify ={
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 博客编辑页面
    data_search = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 搜索功能
    data_center = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    }  # 个人中心页面
    data_index = {
        2021: [i for i in range(12)],
        2020: [i for i in range(12)],
        2019: [i for i in range(12)],
        2018: [i for i in range(12)],
        2017: [i for i in range(12)],
        2016: [i for i in range(12)],
        2015: [i for i in range(12)],
        2014: [i for i in range(12)],
        2013: [i for i in range(12)],
        2012: [i for i in range(12)]

    } # 首页页面
    dataDic = [
        data_login,
        data_register,
        data_error,
        data_learning,
        data_playing,
        data_modify,
        data_search,
        data_center,
        data_index

    ]
    print(draw(xList=x_list, dataDic=dataDic, timeList=time_list))


    #绘制某一个月的所有天数的图片
    year=2021
    month=7
    x_list=['day'+i for i in getMothDate(year,month)] #x的坐标改为日期

    time_list=[
        '一月',
        '二月',
        '三月',
        '四月',
        '五月',
        '六月',
        '七月',
        '八月',
        '九月',
        '十月',
        '十一月',
        '十二月'
    ] #时间轴

    data_login = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }  # 登录页面  数据里面的时间key要与timeline的同步
    data_register ={
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    } # 注册页面
    data_error = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }   # 错误页面
    data_learning = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }   # 学习星球页面
    data_playing = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }   # 快乐星球页面
    data_modify = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }   # 博客编辑页面
    data_search = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }   # 搜索功能
    data_center = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }   # 个人中心页面
    data_index = {
        time_list[0]: [i for i in range(31)],
        time_list[1]: [i for i in range(31)],
        time_list[2]: [i for i in range(31)],
        time_list[3]: [i for i in range(31)],
        time_list[4]: [i for i in range(31)],
        time_list[5]: [i for i in range(31)],
        time_list[6]: [i for i in range(31)],
        time_list[7]: [i for i in range(31)],
        time_list[8]: [i for i in range(31)],
        time_list[9]: [i for i in range(31)],
        time_list[10]: [i for i in range(31)],
        time_list[11]: [i for i in range(31)]

    }  # 首页页面
    dataDic = [
        data_login,
        data_register,
        data_error,
        data_learning,
        data_playing,
        data_modify,
        data_search,
        data_center,
        data_index

    ]

    draw(xList=x_list, dataDic=dataDic, timeList=time_list,filename='demo2.html',series_name='月访问量')


'''
 小帅哥: https://unpkg.com/live2d-widget-model-chitose@1.0.5/assets/chitose.model.json
        萌娘:https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json
        小可爱（女）:https://unpkg.com/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json
        小可爱（男）:https://unpkg.com/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json
        初音:https://unpkg.com/live2d-widget-model-miku@1.0.5/assets/miku.model.json'''